package com.tsx.kafka.cunsumer;

import org.apache.kafka.clients.consumer.ConsumerRecord;



/**
 * 
 * @author tangsixiang
 *
 */
public class KafkaCunsumerReceiver extends AbstractReceiver {

	@Override
	public String topic() {
	//	return "gagaUserSignup;gaga_user_mes";
		return "yiweiCarMes";
	}

	@Override
	public void toDealWith(ConsumerRecord<String, String> record) {
    	System.out.printf("offset = %d, key = %s, value = %s  " , record.offset(), record.key(), record.value());
        try {
			Thread.sleep(1001);
		} catch (InterruptedException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
    	System.out.println("ConsumerRecord--"+record.topic()+" "+record.checksum()+" partition :"+record.partition());
	}

}
